package cn.thread;

import com.gaogao.java.DateSimpleTest;

import java.text.SimpleDateFormat;
import java.text.spi.DateFormatSymbolsProvider;
import java.util.Date;

public class DateTest {
    public static void main(String args[]){
        Date date=new Date(System.currentTimeMillis());
        long endDate=date.getTime();
        boolean flag=true;
        while (flag){
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {

            }
            date=new Date(date.getTime()+1000);
            String sdf=new SimpleDateFormat("hh.mm.ss a").format(date);

            System.out.println(sdf);
            if((endDate+1000*60)<date.getTime()){
                flag=false;
            }
        }

    }
}
